<?php
/**
 * Created by dutuwang.net
 * User: adophper <hello@adophper.com>
 * Date: 2018/4/16
 * Time: 11:02
 */
use common\helpers\TStringHelper;

if (!empty($data[0])) {
    $img1 = TStringHelper::getImageThumbs($data[0]['litpic'], 580, 300);
}else{
    $img1 = '/static/frontend/image/c_9.jpg';
}
if (!empty($data[1])) {
    $img2 = TStringHelper::getImageThumbs($data[1]['litpic'], 720, 410);
}else{
    $img2 = '/static/frontend/image/c_4.jpg';
}
if (!empty($data[2])) {
    $img3 = TStringHelper::getImageThumbs($data[2]['litpic'], 270, 420);
}else{
    $img3 = '/static/frontend/image/c_3.jpg';
}
if (!empty($data[3])) {
    $img4 = TStringHelper::getImageThumbs($data[3]['litpic'], 270, 290);
}else{
    $img4 = '/static/frontend/image/c_5.jpg';
}
if (!empty($data[4])) {
    $img5 = TStringHelper::getImageThumbs($data[4]['litpic'], 270, 290);
}else{
    $img5 = '/static/frontend/image/c_6.jpg';
}
if (!empty($data[5])) {
    $img6 = TStringHelper::getImageThumbs($data[5]['litpic'], 270, 395);
}else{
    $img6 = '/static/frontend/image/c_1.jpg';
}
if (!empty($data[6])) {
    $img7 = TStringHelper::getImageThumbs($data[6]['litpic'], 270, 320);
}else{
    $img7 = '/static/frontend/image/c_2.jpg';
}
if (!empty($data[7])) {
    $img8 = TStringHelper::getImageThumbs($data[7]['litpic'], 270, 420);
}else{
    $img8 = '/static/frontend/image/c_7.jpg';
}
if (!empty($data[8])) {
    $img9 = TStringHelper::getImageThumbs($data[8]['litpic'], 270, 290);
}else{
    $img9 = '/static/frontend/image/c_8.jpg';
}

?>
<ul class="Mosaic_are_list index_hall" id="region_<?=$region_id?>">
    <li class="Mosaic_are_item item1 fl">
        <div class="Mosaic_are_item_top">
            <img src="<?=$img6?>"/>
            <div class="shadow"></div>
        </div>
        <div class="Mosaic_are_item_foot">
            <img src="<?=$img7?>"/>
            <div class="shadow"></div>
        </div>
    </li>
    <li class="Mosaic_are_item item2 fl">
        <div class="Mosaic_are_item_top hall-ad"><?=\frontend\widgets\Ad::widget(['position' => 'index-hall-left'])?></div>
        <div class="Mosaic_are_item_foot hall_item_box">
            <a href="<?=!empty($data[2]) ? Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[2]['id']]) : 'javascript:;'?>"><img src="<?=$img3?>"/></a>
            <div class="shadow"></div>
            <?php
            if (!empty($data[2])) {
            ?>
            <div class="Mosaic_are_item_top_left_box_min_til">
                <h5 class="t_o flex f_center"><?=$data[2]['title']?></h5>
                <div class="flex f_center">
                    <?php
                    if (isset($data[2]['show_start'])) {
                        ?>
                        <i class="iconfont">&#xe615;</i>
                        <span><?=$data[2]['show_start']?></span>
                        <?php
                    }
                    ?>
                    <i class="iconfont">&#xe620;</i>
                    <span><?=$data[2]['city']?></span>
                </div>
                <div class="t_o_lin_ot flex f_warp"><?=TStringHelper::utf8_substr(strip_tags($data[2]['introduce']), 0, 80, '...')?></div>
                <a href="<?=Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[2]['id']])?>" class="flex f_center">查看详情</a>
            </div>
            <?php
            }
            ?>
        </div>
    </li>
    <li class="Mosaic_are_item item3 fl">
        <div class="Mosaic_are_item_top flex">
            <div class="Mosaic_are_item_top_left">
                <div class="Mosaic_are_item_top_left_box">
                    <div class="Mosaic_are_item_top_left_box_min">
                        <a href="<?=!empty($data[0]) ? Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[0]['id']]) : 'javascript:;'?>"><img src="<?=$img1?>"/></a>
                        <?php
                        if (!empty($data[0])) {
                        ?>
                        <div class="Mosaic_are_item_top_left_box_min_til">
                            <h5 class="t_o flex f_center"><?=$data[0]['title']?></h5>
                            <div class="flex f_center">
                                <?php
                                if (isset($data[0]['show_start'])) {
                                ?>
                                <i class="iconfont">&#xe615;</i>
                                <span><?=$data[0]['show_start']?></span>
                                <?php
                                }
                                ?>
                                <i class="iconfont">&#xe620;</i>
                                <span><?=$data[0]['city']?></span>
                            </div>
                            <div class="t_o_lin_ot flex f_warp"><?=TStringHelper::utf8_substr(strip_tags($data[0]['introduce']), 0, 80, '...')?></div>
                            <a href="<?=Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[0]['id']])?>" class="flex f_center">查看详情</a>
                        </div>
                        <?php
                        }
                        ?>
                    </div>
                </div>
            </div>
            <div class="Mosaic_are_item_top_right f_relative hall_item_box">
                <a href="<?=!empty($data[3]) ? Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[3]['id']]) : 'javascript:;'?>"><img src="<?=$img4?>"/></a>
                <div class="shadow"></div>
                <?php
                if (!empty($data[3])) {
                ?>
                <div class="Mosaic_are_item_top_left_box_min_til">
                    <h5 class="t_o flex f_center"><?=$data[3]['title']?></h5>
                    <div class="flex f_center">
                        <?php
                        if (isset($data[3]['show_start'])) {
                            ?>
                            <i class="iconfont">&#xe615;</i>
                            <span><?=$data[3]['show_start']?></span>
                            <?php
                        }
                        ?>
                        <i class="iconfont">&#xe620;</i>
                        <span><?=$data[3]['city']?></span>
                    </div>
                    <div class="t_o_lin_ot flex f_warp"><?=TStringHelper::utf8_substr(strip_tags($data[3]['introduce']), 0, 80, '...')?></div>
                    <a href="<?=Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[3]['id']])?>" class="flex f_center">查看详情</a>
                </div>
                <?php
                }
                ?>
            </div>
        </div>
        <div class="Mosaic_are_item_foot">
            <a href="<?=!empty($data[1]) ? Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[1]['id']]) : 'javascript:;'?>"><img src="<?=$img2?>"/></a>
            <?php
            if (!empty($data[1])) {
            ?>
            <p><i class="t_o_lin"><?=TStringHelper::utf8_substr(strip_tags($data[1]['introduce']), 0, 220, '...')?></i></p>
            <?php
            }
            ?>
        </div>
    </li>
    <li class="Mosaic_are_item item4 fl">
        <div class="Mosaic_are_item_top hall_item_box">
            <a href="<?=!empty($data[4]) ? Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[4]['id']]) : 'javascript:;'?>"><img src="<?=$img5?>"/></a>
            <div class="shadow"></div>
            <?php
            if (!empty($data[4])) {
            ?>
            <div class="Mosaic_are_item_top_left_box_min_til">
                <h5 class="t_o flex f_center"><?=$data[4]['title']?></h5>
                <div class="flex f_center">
                    <?php
                    if (isset($data[4]['show_start'])) {
                        ?>
                        <i class="iconfont">&#xe615;</i>
                        <span><?=$data[4]['show_start']?></span>
                        <?php
                    }
                    ?>
                    <i class="iconfont">&#xe620;</i>
                    <span><?=$data[4]['city']?></span>
                </div>
                <div class="t_o_lin_ot flex f_warp"><?=TStringHelper::utf8_substr(strip_tags($data[4]['introduce']), 0, 80, '...')?></div>
                <a href="<?=Yii::$app->urlManager->createUrl(['hall/detail', 'id' => $data[4]['id']])?>" class="flex f_center">查看详情</a>
            </div>
            <?php
            }
            ?>
        </div>
        <div class="Mosaic_are_item_foot hall-ad">
            <?=\frontend\widgets\Ad::widget(['position' => 'index-hall-right'])?>
        </div>
    </li>
    <li class="Mosaic_are_item item5 fl">
        <div class="Mosaic_are_item_top">
            <img src="<?=$img8?>"/>
            <div class="shadow"></div>
        </div>
        <div class="Mosaic_are_item_foot">
            <img src="<?=$img9?>"/>
            <div class="shadow"></div>
        </div>
    </li>
</ul>
